package com.gopay.common.domain.cps;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

/**
 * 核心处理中心 付款到银行交易收款人信息表
 * @CpsTransReceiver00700.java
 * @author HJY
 * @2013-3-6 上午11:50:47  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name="CPS_TRANS_RECEIVER_00700")

public class CpsTransReceiver00700 extends BaseEntity{

    private static final long serialVersionUID = -2978098275874109218L;

    private Long sq;
    
    private String payerCustId;
    
    private Integer payerCustType;
    
    private String recvBankCode;
    
    private String recvBankName;
    
    private String recvBankBranchName;
    
    private String recvBankAcctName;
    
    private String recvBankAcctNum;
    
    private String recvBankProvinceCode;
    
    private String recvBankProvinceName;
    
    private String recvBankCityCode;
    
    private String recvBankCityName;
    
    private String recvBankPbocNum;
    
    private Date createdTs;
    
    private Date lastUpdTs;
    
    private String lastUpdTranCode;
    
    private String bcFlag;

    private String recvMobile; //add by jianghoup  手机号

    private String acctType;
    @Column(name="ACCT_TYPE")
    public String getAcctType() {
        return acctType;
    }

    public void setAcctType(String acctType) {
        this.acctType = acctType;
    }

    @Id
    @SequenceGenerator(name="CpsTransReceiver00700Sequence",sequenceName="CPS_TRANS_RECEIVER_00700_SEQ")
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CpsTransReceiver00700Sequence")
    @Column(name="SQ", unique=true, nullable=false)
    public Long getSq() {
        return sq;
    }
    public void setSq(Long sq) {
        this.sq = sq;
    }
    @Column(name="PAYER_CUST_ID")
    public String getPayerCustId() {
        return payerCustId;
    }
    public void setPayerCustId(String payerCustId) {
        this.payerCustId = payerCustId;
    }
    @Column(name="PAYER_CUST_TYPE")
    public Integer getPayerCustType() {
        return payerCustType;
    }
    public void setPayerCustType(Integer payerCustType) {
        this.payerCustType = payerCustType;
    }
    @Column(name="RECV_BANK_CODE")
    public String getRecvBankCode() {
        return recvBankCode;
    }
    public void setRecvBankCode(String recvBankCode) {
        this.recvBankCode = recvBankCode;
    }
    @Column(name="RECV_BANK_NAME")
    public String getRecvBankName() {
        return recvBankName;
    }
    public void setRecvBankName(String recvBankName) {
        this.recvBankName = recvBankName;
    }
    @Column(name="RECV_BANK_BRANCH_NAME")
    public String getRecvBankBranchName() {
        return recvBankBranchName;
    }
    public void setRecvBankBranchName(String recvBankBranchName) {
        this.recvBankBranchName = recvBankBranchName;
    }
    @Column(name="RECV_BANK_ACCT_NAME")
    public String getRecvBankAcctName() {
        //return recvBankAcctName;
    	/**
    	 * modify by zyt，2017-2-22 在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctName);
    }
    public void setRecvBankAcctName(String recvBankAcctName) {
        //this.recvBankAcctName = recvBankAcctName;
    	/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctName);
    }
    @Column(name="RECV_BANK_ACCT_NUM")
    public String getRecvBankAcctNum() {
        //return recvBankAcctNum;
    	/**
    	 * modify by zyt，2017-2-22 在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctNum);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctNum);
    }
    public void setRecvBankAcctNum(String recvBankAcctNum) {
        //this.recvBankAcctNum = recvBankAcctNum;
    	/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctNum);
    }
    @Column(name="RECV_BANK_PROVINCE_CODE")
    public String getRecvBankProvinceCode() {
        return recvBankProvinceCode;
    }
    public void setRecvBankProvinceCode(String recvBankProvinceCode) {
        this.recvBankProvinceCode = recvBankProvinceCode;
    }
    @Column(name="RECV_BANK_PROVINCE_NAME")
    public String getRecvBankProvinceName() {
        return recvBankProvinceName;
    }
    public void setRecvBankProvinceName(String recvBankProvinceName) {
        this.recvBankProvinceName = recvBankProvinceName;
    }
    @Column(name="RECV_BANK_CITY_CODE")
    public String getRecvBankCityCode() {
        return recvBankCityCode;
    }
    public void setRecvBankCityCode(String recvBankCityCode) {
        this.recvBankCityCode = recvBankCityCode;
    }
    @Column(name="RECV_BANK_CITY_NAME")
    public String getRecvBankCityName() {
        return recvBankCityName;
    }
    public void setRecvBankCityName(String recvBankCityName) {
        this.recvBankCityName = recvBankCityName;
    }
    @Column(name="RECV_BANK_PBOC_NUM")
    public String getRecvBankPbocNum() {
        return recvBankPbocNum;
    }
    public void setRecvBankPbocNum(String recvBankPbocNum) {
        this.recvBankPbocNum = recvBankPbocNum;
    }
    @Column(name="CREATED_TS")
    public Date getCreatedTs() {
        return createdTs;
    }
    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }
    @Column(name="LAST_UPD_TS")
    public Date getLastUpdTs() {
        return lastUpdTs;
    }
    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }
    @Column(name="LAST_UPD_TRANCODE")
    public String getLastUpdTranCode() {
        return lastUpdTranCode;
    }
    public void setLastUpdTranCode(String lastUpdTranCode) {
        this.lastUpdTranCode = lastUpdTranCode;
    }
    public void setBcFlag(String bcFlag) {
        this.bcFlag = bcFlag;
    }
    @Column(name="BC_FLAG")
    public String getBcFlag() {
        return bcFlag;
    }

    @Column(name="RECV_MOBILE")
    public String getRecvMobile() {
        //return recvMobile;
        /**
         * modified by zyt 2017-4-12 自动重新加密并解密返回
         */
        this.recvMobile = SensitiveInfoUtils.autoReencrypt(this.recvMobile);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.recvMobile);
    }

    public void setRecvMobile(String recvMobile) {
        //this.recvMobile = recvMobile;
        /**
         * modified by zyt 2017-4-12 写操作的时候做加密
         */
        this.recvMobile = SensitiveInfoUtils.smartEncryptWithCheck(recvMobile);
    }
}
